#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2018, Intel Corporation
#
#
# pmempool_check/TEST18 -- test for fixing various fields repairability without
#	advanced flag
#

. ../unittest/unittest.sh

require_test_type medium

require_fs_type pmem non-pmem

setup

POOLSET=$DIR/pool.set
POOL_P1=$DIR/pool.p1
POOL_P2=$DIR/pool.p2
LOG=out${UNITTEST_NUM}.log
rm -f $LOG && touch $LOG

create_poolset $POOLSET 20M:$POOL_P1:z 50M:$POOL_P2:z

expect_normal_exit $PMEMPOOL$EXESUFFIX create log $POOLSET

$PMEMSPOIL -v $POOL_P1\
	pool_hdr.major=0x0\
	pool_hdr.poolset_uuid=0x0\
	pool_hdr.uuid=0x0\
	>> $LOG

expect_normal_exit $PMEMPOOL$EXESUFFIX check -rvy $POOLSET >> $LOG
expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOLSET &> /dev/null

check

pass
